package com.example.springboot.entity;

import lombok.Data;

import java.io.Serializable;

/**
 * springboot自带分页
 *
 * @Author:ChenZhangKun
 * @Date: 2022/4/17 20:02
 */
@Data
public class PageParam<T> implements Serializable {
    private static final long serialVersionUID = -7916211163897873899L;

    private int pageNum = 1;

    private int pageSize = 10;
    /**
     * 分页参数
     */
    private T param;
    //排序字段
    private String orderBy;

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public T getParam() {
        return param;
    }

    public void setParam(T param) {
        this.param = param;
    }

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        //需要注意sql注入
        this.orderBy = orderBy;
    }

}
